package com.bjsxt.search.pojo;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @ClassName : Item4ES
 * @Description : 商品 ES
 * @Author : ZWZ
 * @Date: 2021/8/23 15:01
 */
@Document(indexName = "livegoods-item", type = "item")
@Data
@EqualsAndHashCode
@ToString
@NoArgsConstructor
public class Item4ES {

    @Id
    private String id;

    /**
     * 标题，字符串
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;
    /**
     * 商品图片，字符串
     */
    @Field(type = FieldType.Keyword)
    private String img;

    /**
     * 所属城市，字符串
     */
    @Field(type = FieldType.Keyword)
    private String city;
    /**
     * 价格，数学
     */
    @Field(type = FieldType.Keyword)
    private String price;

    /**
     * 租赁方式，整租，合租等。 字符串
     */
    @Field(type = FieldType.Keyword)
    private String rentType;

    /**
     * 房屋面积，字符串
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String houseType;

}
